1. Field of the Invention
The present invention generally relates to coordinate detection devices and methods of detecting coordinates, and more particularly to a coordinate detection device employing a coordinate input panel of a resistive film type and a method of detecting coordinates with such a coordinate detection device.
2. Description of the Related Art
Recently, as a personal computer has become smaller and thinner in size, a coordinate input panel has been employed for input operations. The coordinate input panel occupies less space than a mouse not only physically, but also operationally because the operation area of the coordinate input panel is limited to the surface thereof. Moreover, the coordinate input panel can be easily utilized as a pointing device for a personal computer. Therefore, the coordinate input panel has frequently replaced the mouse as a coordinate input device.
Among the coordinate input panels, that of a resistive film type is more frequently used. In the case of the coordinate input panel of the resistive film type, input operations can be performed by a pen. Therefore, the coordinate input panel of the resistive film type can be used as a device for inputting a signature or drawing a picture.
A conventional coordinate detection device employing the coordinate input panel includes two operation modes: an absolute coordinate value mode which outputs the coordinate value of an input point on the coordinate input panel one-to-one on a screen, and a relative coordinate value mode which outputs, as a movement, a difference between the respective coordinate values detected at previous and current sampling timings (hereinafter referred to as previous and current coordinate values, respectively). The switching of these modes is controlled by a device driver (software) or a controller (hardware).
FIG. 1 is a flowchart of a conventional coordinate detection process, in which the coordinate input panel is employed to detect a coordinate value.
In step S10, it is determined whether an input operation has been performed on the coordinate input panel to switch the coordinate input panel “ON”. If the result of step S10 is “NO”, that is, if the coordinate input panel has not been switched “ON”, the process goes to step S11. In step S11, a previous coordinate value is cleared. Thereafter, the process returns to step S10 to determine whether the coordinate input panel has been switched “ON”. If the result of step S10 is “YES”, that is, if the coordinate input panel has been switched “ON”, the process goes to step S12. In step S12, the voltage of an input point on the coordinate input panel is detected to detect the coordinate value of the input point. In step S13, it is determined whether the voltage of the input point is detected a predetermined number of times in step S12. If the result of step S13 is “YES”, that is, if the voltage is detected the predetermined number of times, the process goes to step S14. In step S14, the average of the values of the voltage detected the predetermined number of times is calculated. In step S15, the average value calculated in step S14 is defined as a current coordinate value.
Through steps S10 through S15, the coordinate value of the input point on the coordinate input panel is detected as the current coordinate value. As described above, a correct coordinate value can be obtained by detecting the voltage the predetermined number of times to prevent the coordinate value of an input point formed by an improper input operation from being detected.
Next, in step S16, it is determined whether the mode of the coordinate input panel is the relative coordinate value mode. A process performed in step S16 is switched by a device driver or controller. If the result of step S16 is “NO”, the mode of the coordinate input panel is the absolute coordinate value mode, and the process goes to steps S22 and S23, which comply with the absolute coordinate value mode. In step S22, the current coordinate value is converted into a current absolute coordinate value. In step S23, data for the current absolute coordinate value obtained in step S22 is output.
On the other hand, if the result of step S16 is “YES”, that is, if the mode of the coordinate input panel is the relative coordinate value mode, a process complying with the relative coordinate value mode is performed. First, in step S17, it is determined whether the previous coordinate value is stored. If the result of step S17 is “NO”, that is, if the previous coordinate value is cleared, the process goes to step S18. In step S18, the current coordinate value is converted into the previous coordinate value. Then, the process returns to step S10 to repeat the process thereafter, thereby detecting a coordinate value of the next sampling timing (hereinafter referred to a next coordinate value). If the result of step S17 is “YES”, that is, if the previous coordinate value is stored, a relative coordinate value is obtained based on the previous coordinate value. In step S19, a difference between the previous and current coordinate values is obtained, and this difference is output to a control circuit to obtain the current relative coordinate value. In step S20, the current coordinate value is converted into the previous coordinate value to obtain the next coordinate value. In step S21, the difference between the previous and current coordinate values, which difference is obtained in step S19 to obtain the current relative coordinate value, is output.
As described above, the coordinate detection process is performed to comply with either the relative or absolute coordinate value mode by switching the operation modes based on the determination of whether the operation mode is set in the relative coordinate value mode.
FIGS. 2A and 2B are diagrams illustrating a conventional input operation.
Suppose that an operator inputs a Japanese hiragana letter  to a coordinate input panel in the relative coordinate value mode, using an operator's finger or a pen.
FIG. 2A shows a series of operations (strokes) to input the letter to the coordinate input panel. The operator inputs a series of strokes (a) through (c) in this order in directions indicated by respective arrows in FIG. 2A on the surface of the coordinate input panel. However, since the conventional coordinate input panel is basically set in the relative coordinate value mode, the strokes (a) through (c) are not expressed as in FIG. 2A, but are sequentially expressed as in FIG. 2B. The input points of the stroke (a), for which no previous coordinate value exists, are converted into coordinates and expressed as the input points are formed on the surface of the coordinate input panel. However, since the coordinate input panel is set in the relative coordinate value mode, the last input point of the stroke (a) and the initial input point of the stroke (b) are expressed as the same coordinate value, and the last input point of the stroke (b) and the initial input point of the stroke (c) are expressed as the same coordinate value. That is, since the coordinate value of an input point is detected based on a difference between the previous and current coordinate values in the relative coordinate value mode, the previous coordinate value becomes identical to the current coordinate value when the coordinate input panel is pressed separately at the respective previous and current input or sampling timings. Thus, the coordinate values of the respective strokes are output in sequence. The coordinate values should be detected in the absolute coordinate value mode to obtain the same output as shown in FIG. 2A.
Therefore, in the case of detecting the coordinate values of a series of operations, once the relative coordinate value mode is set with respect to the operations, it is impossible to switch the relative coordinate value mode to the absolute coordinate value mode, causing the input operations on the coordinate input panel not to correspond to outputs on a display.
As described above, a device driver or controller is employed to set the relative and absolute coordinate value modes for a series of operations. Therefore, if the operator wishes to detect a coordinate value in a desired mode other than a set mode, the set mode cannot be switched to the desired mode during the series of operations.
Further, the coordinate value of an input point on the conventional coordinate input panel is output one-to-one on a screen in the absolute coordinate value mode. Therefore, if input points on the coordinate input panel do not correspond to display positions on the screen, it is difficult to display the coordinate value of an input point on the coordinate input panel in a corresponding position on the screen.